package com.sskj.postar.service.impl;

import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.sskj.postar.model.Information;
import com.sskj.postar.service.InformationMapper;
import com.sskj.postar.service.InformationService;

import java.util.List;

@Service
public class InformationServiceImpl implements InformationService{

    @Resource
    private InformationMapper informationMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return informationMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Information record) {
        return informationMapper.insert(record);
    }

    @Override
    public int insertSelective(Information record) {
        return informationMapper.insertSelective(record);
    }

    @Override
    public Information selectByPrimaryKey(Integer id) {
        return informationMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Information record) {
        return informationMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Information record) {
        return informationMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Information> getAll() {
        return informationMapper.getAllOrderByCreateTimeDesc();
    }


}
